<!DOCTYPE html>

<html lang='en'>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/react.development16.4.0.js"></script>
    <script src="./lib/react-dom.development16.4.0.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>

<body>
    <div id="app">
    </div>
    <script type="text/babel">
       
       
        function Component01(props) {
            return <h1>显示组件当中的数据{props.uname}</h1>
        }

    
        class Welcome extends React.Component {

            render() {
                let {name} = this.props
                //this.props.name = '12312'  this.props在组件中是只读，不可被修改
                return (
                    <div>
                        <Component01 uname="Tom"/>
                        <Component01 uname="jick"/>
                        <Component01 uname="Lucy"/>
                        <Component01 uname="Perter"/>
                        <h1>父组件里面显示内容:{name}</h1>
                    </div>
                )
            }
        }
        

        const el = <Welcome name="欢迎你的到来！！！React"/>

        ReactDOM.render(
            el,document.getElementById('app')
        );
    </script>
</body>

</html>